package org.base.oj.controller;

import org.base.oj.domain.dto.RoleDTO;
import org.base.oj.common.BaseResponse;
import org.base.oj.common.ResultUtils;
import org.base.oj.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("role")
public class RoleController {
    @Autowired
    private RoleService roleService;
    @PostMapping
    public BaseResponse getRolePermissionByUserPid(@RequestBody RoleDTO roleDTO) {
        roleService.saveRolePermissionByUserPid(roleDTO);
        return ResultUtils.success("添加成功");
    }
}
